<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>企业微信扫码登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap-grid.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap-reboot.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
    <script src="http://rescdn.qqmail.com/node/ww/wwopenmng/js/sso/wwLogin-1.0.0.js"></script>
    <style>
        body{ text-align:center}
    </style>
</head>
<body>
<div id="wx_reg">

</div>
<script>
    var appid = '[[${appid}]]'; //企业微信的CorpID，在企业微信管理端查看
    var agentid = '[[${agentid}]]'; //授权方的网页应用ID，在具体的网页应用中查看
    var redirect_uri = '[[${redirect_uri}]]'; //重定向地址，需要进行UrlEncode
    var state = '[[${state}]]'; //用于保持请求和回调的状态，授权请求后原样带回给企业。该参数可用于防止csrf攻击（跨站请求伪造攻击），建议企业带上该参数，可设置为简单的随机数加session进行校验
    var href = '[[${href}]]'; //非必填，自定义样式链接，企业可根据实际需求覆盖默认样式。详见文档底部FAQ
    window.WwLogin({
        "id" : "wx_reg",//企业页面显示二维码的容器id
        "appid" : appid,
        "agentid" : agentid,
        "redirect_uri" :redirect_uri,
        "state" : state,
        "href" : "",
    });
</script>
</body>
</html>
